package me.leiusual.sharing.repository.model

/**
 * author: leiusual
 * create on: 2018/11/14
 * description: 有状态的数据，用于LiveData。
 */
sealed class Data<out T> : DataWrapper<T>() {

  data class Loading(val message: String = "loading...") : Data<Nothing>()

  data class Error(val error: Throwable) : Data<Nothing>()

  data class Success<out T>(val data: T) : Data<T>()
}